• milkdairyDataSet1.Designer.cs
  • project /
1 //------------------------------------------------------------------------------
2 // <auto-generated>
3 // This code was generated
by a tool.
4 // Runtime Version:
4.0.30319.42000
5 //
6 // Changes to
this file may cause incorrect behavior and will be lost if
7 // the code
is regenerated.
8 // </auto-generated>
9 //------------------------------------------------------------------------------

10
11 #pragma warning disable
1591
12
13 namespace
MilkDairyManagementSystemCSharp {
14     
15     
16     ///
<summary>
17     ///
Represents a strongly typed in-memory cache of data.
18     ///</summary>

19     
[global::System.Serializable()]
20     
[global::System.ComponentModel.DesignerCategoryAttribute("code")]
21     
[global::System.ComponentModel.ToolboxItem(true)]
22     
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")]
23     
[global::System.Xml.Serialization.XmlRootAttribute("milkdairyDataSet1")]
24     
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
25     
public partial class milkdairyDataSet1 : global::System.Data.DataSet {
26         
27         
private acntDataTable tableacnt;
28         
29         
private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
30         
31         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
32         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
33         
public milkdairyDataSet1() {
34             
this.BeginInit();
35             
this.InitClass();
36             
global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
37             
base.Tables.CollectionChanged += schemaChangedHandler;
38             
base.Relations.CollectionChanged += schemaChangedHandler;
39             
this.EndInit();
40         }
41         
42         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
43         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
44         
protected milkdairyDataSet1(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
45                 
base(info, context, false) {
46             
if ((this.IsBinarySerialized(info, context) == true)) {
47                 
this.InitVars(false);
48                 
global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
49                 
this.Tables.CollectionChanged += schemaChangedHandler1;
50                 
this.Relations.CollectionChanged += schemaChangedHandler1;
51                 
return;
52             }
53             
string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
54             
if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
55                 
global::System.Data.DataSet ds = new global::System.Data.DataSet();
56                 ds.ReadXmlSchema(
new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
57                 
if ((ds.Tables["acnt"] != null)) {
58                     
base.Tables.Add(new acntDataTable(ds.Tables["acnt"]));
59                 }
60                 
this.DataSetName = ds.DataSetName;
61                 
this.Prefix = ds.Prefix;
62                 
this.Namespace = ds.Namespace;
63                 
this.Locale = ds.Locale;
64                 
this.CaseSensitive = ds.CaseSensitive;
65                 
this.EnforceConstraints = ds.EnforceConstraints;
66                 
this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
67                 
this.InitVars();
68             }
69             
else {
70                 
this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
71             }
72             
this.GetSerializationData(info, context);
73             
global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
74             
base.Tables.CollectionChanged += schemaChangedHandler;
75             
this.Relations.CollectionChanged += schemaChangedHandler;
76         }
77         
78         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
79         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
80         
[global::System.ComponentModel.Browsable(false)]
81         
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
82         
public acntDataTable acnt {
83             
get {
84                 
return this.tableacnt;
85             }
86         }
87         
88         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
89         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
90         
[global::System.ComponentModel.BrowsableAttribute(true)]
91         
[global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)]
92         
public override global::System.Data.SchemaSerializationMode SchemaSerializationMode {
93             
get {
94                 
return this._schemaSerializationMode;
95             }
96             
set {
97                 
this._schemaSerializationMode = value;
98             }
99         }
100         
101         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
102         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
103         
[global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
104         
public new global::System.Data.DataTableCollection Tables {
105             
get {
106                 
return base.Tables;
107             }
108         }
109         
110         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
111         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
112         
[global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
113         
public new global::System.Data.DataRelationCollection Relations {
114             
get {
115                 
return base.Relations;
116             }
117         }
118         
119         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
120         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
121         
protected override void InitializeDerivedDataSet() {
122             
this.BeginInit();
123             
this.InitClass();
124             
this.EndInit();
125         }
126         
127         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
128         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
129         
public override global::System.Data.DataSet Clone() {
130             milkdairyDataSet1 cln = ((milkdairyDataSet1)(
base.Clone()));
131             cln.InitVars();
132             cln.SchemaSerializationMode =
this.SchemaSerializationMode;
133             
return cln;
134         }
135         
136         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
137         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
138         
protected override bool ShouldSerializeTables() {
139             
return false;
140         }
141         
142         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
143         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
144         
protected override bool ShouldSerializeRelations() {
145             
return false;
146         }
147         
148         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
149         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
150         
protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) {
151             
if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
152                 
this.Reset();
153                 
global::System.Data.DataSet ds = new global::System.Data.DataSet();
154                 ds.ReadXml(reader);
155                 
if ((ds.Tables["acnt"] != null)) {
156                     
base.Tables.Add(new acntDataTable(ds.Tables["acnt"]));
157                 }
158                 
this.DataSetName = ds.DataSetName;
159                 
this.Prefix = ds.Prefix;
160                 
this.Namespace = ds.Namespace;
161                 
this.Locale = ds.Locale;
162                 
this.CaseSensitive = ds.CaseSensitive;
163                 
this.EnforceConstraints = ds.EnforceConstraints;
164                 
this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
165                 
this.InitVars();
166             }
167             
else {
168                 
this.ReadXml(reader);
169                 
this.InitVars();
170             }
171         }
172         
173         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
174         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
175         
protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() {
176             
global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream();
177             
this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null));
178             stream.Position =
0;
179             
return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null);
180         }
181         
182         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
183         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
184         
internal void InitVars() {
185             
this.InitVars(true);
186         }
187         
188         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
189         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
190         
internal void InitVars(bool initTable) {
191             
this.tableacnt = ((acntDataTable)(base.Tables["acnt"]));
192             
if ((initTable == true)) {
193                 
if ((this.tableacnt != null)) {
194                     
this.tableacnt.InitVars();
195                 }
196             }
197         }
198         
199         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
200         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
201         
private void InitClass() {
202             
this.DataSetName = "milkdairyDataSet1";
203             
this.Prefix = "";
204             
this.Namespace = "http://tempuri.org/milkdairyDataSet1.xsd";
205             
this.EnforceConstraints = true;
206             
this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
207             
this.tableacnt = new acntDataTable();
208             
base.Tables.Add(this.tableacnt);
209         }
210         
211         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
212         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
213         
private bool ShouldSerializeacnt() {
214             
return false;
215         }
216         
217         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
218         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
219         
private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {
220             
if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) {
221                 
this.InitVars();
222             }
223         }
224         
225         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
226         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
227         
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
228             milkdairyDataSet1 ds =
new milkdairyDataSet1();
229             
global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
230             
global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
231             
global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny();
232             any.Namespace = ds.Namespace;
233             sequence.Items.Add(any);
234             type.Particle = sequence;
235             
global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
236             
if (xs.Contains(dsSchema.TargetNamespace)) {
237                 
global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
238                 
global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
239                 
try {
240                     
global::System.Xml.Schema.XmlSchema schema = null;
241                     dsSchema.Write(s1);
242                     
for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
243                         schema = ((
global::System.Xml.Schema.XmlSchema)(schemas.Current));
244                         s2.SetLength(
0);
245                         schema.Write(s2);
246                         
if ((s1.Length == s2.Length)) {
247                             s1.Position =
0;
248                             s2.Position =
0;
249                             
for (; ((s1.Position != s1.Length)
250                                         && (s1.ReadByte() == s2.ReadByte())); ) {
251                                 ;
252                             }
253                             
if ((s1.Position == s1.Length)) {
254                                 
return type;
255                             }
256                         }
257                     }
258                 }
259                 
finally {
260                     
if ((s1 != null)) {
261                         s1.Close();
262                     }
263                     
if ((s2 != null)) {
264                         s2.Close();
265                     }
266                 }
267             }
268             xs.Add(dsSchema);
269             
return type;
270         }
271         
272         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
273         
public delegate void acntRowChangeEventHandler(object sender, acntRowChangeEvent e);
274         
275         ///
<summary>
276         ///
Represents the strongly named DataTable class.
277         ///</summary>

278         
[global::System.Serializable()]
279         
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
280         
public partial class acntDataTable : global::System.Data.TypedTableBase<acntRow> {
281             
282             
private global::System.Data.DataColumn columnId;
283             
284             
private global::System.Data.DataColumn columnname;
285             
286             
private global::System.Data.DataColumn columnaddr;
287             
288             
private global::System.Data.DataColumn columnmobile;
289             
290             
private global::System.Data.DataColumn columncenter;
291             
292             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
293             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
294             
public acntDataTable() {
295                 
this.TableName = "acnt";
296                 
this.BeginInit();
297                 
this.InitClass();
298                 
this.EndInit();
299             }
300             
301             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
302             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
303             
internal acntDataTable(global::System.Data.DataTable table) {
304                 
this.TableName = table.TableName;
305                 
if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
306                     
this.CaseSensitive = table.CaseSensitive;
307                 }
308                 
if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
309                     
this.Locale = table.Locale;
310                 }
311                 
if ((table.Namespace != table.DataSet.Namespace)) {
312                     
this.Namespace = table.Namespace;
313                 }
314                 
this.Prefix = table.Prefix;
315                 
this.MinimumCapacity = table.MinimumCapacity;
316             }
317             
318             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
319             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
320             
protected acntDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
321                     
base(info, context) {
322                 
this.InitVars();
323             }
324             
325             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
326             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
327             
public global::System.Data.DataColumn IdColumn {
328                 
get {
329                     
return this.columnId;
330                 }
331             }
332             
333             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
334             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
335             
public global::System.Data.DataColumn nameColumn {
336                 
get {
337                     
return this.columnname;
338                 }
339             }
340             
341             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
342             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
343             
public global::System.Data.DataColumn addrColumn {
344                 
get {
345                     
return this.columnaddr;
346                 }
347             }
348             
349             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
350             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
351             
public global::System.Data.DataColumn mobileColumn {
352                 
get {
353                     
return this.columnmobile;
354                 }
355             }
356             
357             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
358             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
359             
public global::System.Data.DataColumn centerColumn {
360                 
get {
361                     
return this.columncenter;
362                 }
363             }
364             
365             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
366             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
367             
[global::System.ComponentModel.Browsable(false)]
368             
public int Count {
369                 
get {
370                     
return this.Rows.Count;
371                 }
372             }
373             
374             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
375             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
376             
public acntRow this[int index] {
377                 
get {
378                     
return ((acntRow)(this.Rows[index]));
379                 }
380             }
381             
382             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
383             
public event acntRowChangeEventHandler acntRowChanging;
384             
385             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
386             
public event acntRowChangeEventHandler acntRowChanged;
387             
388             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
389             
public event acntRowChangeEventHandler acntRowDeleting;
390             
391             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
392             
public event acntRowChangeEventHandler acntRowDeleted;
393             
394             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
395             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
396             
public void AddacntRow(acntRow row) {
397                 
this.Rows.Add(row);
398             }
399             
400             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
401             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
402             
public acntRow AddacntRow(string name, string addr, string mobile, string center) {
403                 acntRow rowacntRow = ((acntRow)(
this.NewRow()));
404                 
object[] columnValuesArray = new object[] {
405                         
null,
406                         name,
407                         addr,
408                         mobile,
409                         center};
410                 rowacntRow.ItemArray = columnValuesArray;
411                 
this.Rows.Add(rowacntRow);
412                 
return rowacntRow;
413             }
414             
415             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
416             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
417             
public acntRow FindById(int Id) {
418                 
return ((acntRow)(this.Rows.Find(new object[] {
419                             Id})));
420             }
421             
422             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
423             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
424             
public override global::System.Data.DataTable Clone() {
425                 acntDataTable cln = ((acntDataTable)(
base.Clone()));
426                 cln.InitVars();
427                 
return cln;
428             }
429             
430             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
431             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
432             
protected override global::System.Data.DataTable CreateInstance() {
433                 
return new acntDataTable();
434             }
435             
436             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
437             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
438             
internal void InitVars() {
439                 
this.columnId = base.Columns["Id"];
440                 
this.columnname = base.Columns["name"];
441                 
this.columnaddr = base.Columns["addr"];
442                 
this.columnmobile = base.Columns["mobile"];
443                 
this.columncenter = base.Columns["center"];
444             }
445             
446             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
447             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
448             
private void InitClass() {
449                 
this.columnId = new global::System.Data.DataColumn("Id", typeof(int), null, global::System.Data.MappingType.Element);
450                 
base.Columns.Add(this.columnId);
451                 
this.columnname = new global::System.Data.DataColumn("name", typeof(string), null, global::System.Data.MappingType.Element);
452                 
base.Columns.Add(this.columnname);
453                 
this.columnaddr = new global::System.Data.DataColumn("addr", typeof(string), null, global::System.Data.MappingType.Element);
454                 
base.Columns.Add(this.columnaddr);
455                 
this.columnmobile = new global::System.Data.DataColumn("mobile", typeof(string), null, global::System.Data.MappingType.Element);
456                 
base.Columns.Add(this.columnmobile);
457                 
this.columncenter = new global::System.Data.DataColumn("center", typeof(string), null, global::System.Data.MappingType.Element);
458                 
base.Columns.Add(this.columncenter);
459                 
this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
460                                 
this.columnId}, true));
461                 
this.columnId.AutoIncrement = true;
462                 
this.columnId.AutoIncrementSeed = -1;
463                 
this.columnId.AutoIncrementStep = -1;
464                 
this.columnId.AllowDBNull = false;
465                 
this.columnId.ReadOnly = true;
466                 
this.columnId.Unique = true;
467                 
this.columnname.MaxLength = 50;
468                 
this.columnaddr.MaxLength = 50;
469                 
this.columnmobile.MaxLength = 50;
470                 
this.columncenter.MaxLength = 50;
471             }
472             
473             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
474             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
475             
public acntRow NewacntRow() {
476                 
return ((acntRow)(this.NewRow()));
477             }
478             
479             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
480             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
481             
protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
482                 
return new acntRow(builder);
483             }
484             
485             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
486             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
487             
protected override global::System.Type GetRowType() {
488                 
return typeof(acntRow);
489             }
490             
491             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
492             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
493             
protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
494                 
base.OnRowChanged(e);
495                 
if ((this.acntRowChanged != null)) {
496                     
this.acntRowChanged(this, new acntRowChangeEvent(((acntRow)(e.Row)), e.Action));
497                 }
498             }
499             
500             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
501             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
502             
protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
503                 
base.OnRowChanging(e);
504                 
if ((this.acntRowChanging != null)) {
505                     
this.acntRowChanging(this, new acntRowChangeEvent(((acntRow)(e.Row)), e.Action));
506                 }
507             }
508             
509             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
510             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
511             
protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
512                 
base.OnRowDeleted(e);
513                 
if ((this.acntRowDeleted != null)) {
514                     
this.acntRowDeleted(this, new acntRowChangeEvent(((acntRow)(e.Row)), e.Action));
515                 }
516             }
517             
518             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
519             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
520             
protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
521                 
base.OnRowDeleting(e);
522                 
if ((this.acntRowDeleting != null)) {
523                     
this.acntRowDeleting(this, new acntRowChangeEvent(((acntRow)(e.Row)), e.Action));
524                 }
525             }
526             
527             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
528             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
529             
public void RemoveacntRow(acntRow row) {
530                 
this.Rows.Remove(row);
531             }
532             
533             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
534             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
535             
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
536                 
global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
537                 
global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
538                 milkdairyDataSet1 ds =
new milkdairyDataSet1();
539                 
global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
540                 any1.Namespace =
"http://www.w3.org/2001/XMLSchema";
541                 any1.MinOccurs =
new decimal(0);
542                 any1.MaxOccurs =
decimal.MaxValue;
543                 any1.ProcessContents =
global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
544                 sequence.Items.Add(any1);
545                 
global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
546                 any2.Namespace =
"urn:schemas-microsoft-com:xml-diffgram-v1";
547                 any2.MinOccurs =
new decimal(1);
548                 any2.ProcessContents =
global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
549                 sequence.Items.Add(any2);
550                 
global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
551                 attribute1.Name =
"namespace";
552                 attribute1.FixedValue = ds.Namespace;
553                 type.Attributes.Add(attribute1);
554                 
global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
555                 attribute2.Name =
"tableTypeName";
556                 attribute2.FixedValue =
"acntDataTable";
557                 type.Attributes.Add(attribute2);
558                 type.Particle = sequence;
559                 
global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
560                 
if (xs.Contains(dsSchema.TargetNamespace)) {
561                     
global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
562                     
global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
563                     
try {
564                         
global::System.Xml.Schema.XmlSchema schema = null;
565                         dsSchema.Write(s1);
566                         
for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
567                             schema = ((
global::System.Xml.Schema.XmlSchema)(schemas.Current));
568                             s2.SetLength(
0);
569                             schema.Write(s2);
570                             
if ((s1.Length == s2.Length)) {
571                                 s1.Position =
0;
572                                 s2.Position =
0;
573                                 
for (; ((s1.Position != s1.Length)
574                                             && (s1.ReadByte() == s2.ReadByte())); ) {
575                                     ;
576                                 }
577                                 
if ((s1.Position == s1.Length)) {
578                                     
return type;
579                                 }
580                             }
581                         }
582                     }
583                     
finally {
584                         
if ((s1 != null)) {
585                             s1.Close();
586                         }
587                         
if ((s2 != null)) {
588                             s2.Close();
589                         }
590                     }
591                 }
592                 xs.Add(dsSchema);
593                 
return type;
594             }
595         }

596         
597         ///
<summary>
598         ///
Represents strongly named DataRow class.
599         ///</summary>

600         
public partial class acntRow : global::System.Data.DataRow {
601             
602             
private acntDataTable tableacnt;
603             
604             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
605             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
606             
internal acntRow(global::System.Data.DataRowBuilder rb) :
607                     
base(rb) {
608                 
this.tableacnt = ((acntDataTable)(this.Table));
609             }
610             
611             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
612             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
613             
public int Id {
614                 
get {
615                     
return ((int)(this[this.tableacnt.IdColumn]));
616                 }
617                 
set {
618                     
this[this.tableacnt.IdColumn] = value;
619                 }
620             }
621             
622             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
623             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
624             
public string name {
625                 
get {
626                     
try {
627                         
return ((string)(this[this.tableacnt.nameColumn]));
628                     }
629                     
catch (global::System.InvalidCastException e) {
630                         
throw new global::System.Data.StrongTypingException("The value for column \'name\' in table \'acnt\' is DBNull.", e);
631                     }
632                 }
633                 
set {
634                     
this[this.tableacnt.nameColumn] = value;
635                 }
636             }
637             
638             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
639             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
640             
public string addr {
641                 
get {
642                     
try {
643                         
return ((string)(this[this.tableacnt.addrColumn]));
644                     }
645                     
catch (global::System.InvalidCastException e) {
646                         
throw new global::System.Data.StrongTypingException("The value for column \'addr\' in table \'acnt\' is DBNull.", e);
647                     }
648                 }
649                 
set {
650                     
this[this.tableacnt.addrColumn] = value;
651                 }
652             }
653             
654             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
655             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
656             
public string mobile {
657                 
get {
658                     
try {
659                         
return ((string)(this[this.tableacnt.mobileColumn]));
660                     }
661                     
catch (global::System.InvalidCastException e) {
662                         
throw new global::System.Data.StrongTypingException("The value for column \'mobile\' in table \'acnt\' is DBNull.", e);
663                     }
664                 }
665                 
set {
666                     
this[this.tableacnt.mobileColumn] = value;
667                 }
668             }
669             
670             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
671             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
672             
public string center {
673                 
get {
674                     
try {
675                         
return ((string)(this[this.tableacnt.centerColumn]));
676                     }
677                     
catch (global::System.InvalidCastException e) {
678                         
throw new global::System.Data.StrongTypingException("The value for column \'center\' in table \'acnt\' is DBNull.", e);
679                     }
680                 }
681                 
set {
682                     
this[this.tableacnt.centerColumn] = value;
683                 }
684             }
685             
686             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
687             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
688             
public bool IsnameNull() {
689                 
return this.IsNull(this.tableacnt.nameColumn);
690             }
691             
692             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
693             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
694             
public void SetnameNull() {
695                 
this[this.tableacnt.nameColumn] = global::System.Convert.DBNull;
696             }
697             
698             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
699             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
700             
public bool IsaddrNull() {
701                 
return this.IsNull(this.tableacnt.addrColumn);
702             }
703             
704             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
705             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
706             
public void SetaddrNull() {
707                 
this[this.tableacnt.addrColumn] = global::System.Convert.DBNull;
708             }
709             
710             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
711             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
712             
public bool IsmobileNull() {
713                 
return this.IsNull(this.tableacnt.mobileColumn);
714             }
715             
716             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
717             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
718             
public void SetmobileNull() {
719                 
this[this.tableacnt.mobileColumn] = global::System.Convert.DBNull;
720             }
721             
722             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
723             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
724             
public bool IscenterNull() {
725                 
return this.IsNull(this.tableacnt.centerColumn);
726             }
727             
728             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
729             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
730             
public void SetcenterNull() {
731                 
this[this.tableacnt.centerColumn] = global::System.Convert.DBNull;
732             }
733         }

734         
735         ///
<summary>
736         ///
Row event argument class
737         ///</summary>

738         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
739         
public class acntRowChangeEvent : global::System.EventArgs {
740             
741             
private acntRow eventRow;
742             
743             
private global::System.Data.DataRowAction eventAction;
744             
745             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
746             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
747             
public acntRowChangeEvent(acntRow row, global::System.Data.DataRowAction action) {
748                 
this.eventRow = row;
749                 
this.eventAction = action;
750             }
751             
752             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
753             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
754             
public acntRow Row {
755                 
get {
756                     
return this.eventRow;
757                 }
758             }
759             
760             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
761             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
762             
public global::System.Data.DataRowAction Action {
763                 
get {
764                     
return this.eventAction;
765                 }
766             }
767         }
768     }
769 }

770 namespace
MilkDairyManagementSystemCSharp.milkdairyDataSet1TableAdapters {
771     
772     
773     ///
<summary>
774     ///
Represents the connection and commands used to retrieve and save data.
775     ///</summary>

776     
[global::System.ComponentModel.DesignerCategoryAttribute("code")]
777     
[global::System.ComponentModel.ToolboxItem(true)]
778     
[global::System.ComponentModel.DataObjectAttribute(true)]
779     [
global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
780         
", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
781     
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
782     
public partial class acntTableAdapter : global::System.ComponentModel.Component {
783         
784         
private global::System.Data.SqlClient.SqlDataAdapter _adapter;
785         
786         
private global::System.Data.SqlClient.SqlConnection _connection;
787         
788         
private global::System.Data.SqlClient.SqlTransaction _transaction;
789         
790         
private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
791         
792         
private bool _clearBeforeFill;
793         
794         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
795         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
796         
public acntTableAdapter() {
797             
this.ClearBeforeFill = true;
798         }
799         
800         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
801         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
802         
protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
803             
get {
804                 
if ((this._adapter == null)) {
805                     
this.InitAdapter();
806                 }
807                 
return this._adapter;
808             }
809         }
810         
811         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
812         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
813         
internal global::System.Data.SqlClient.SqlConnection Connection {
814             
get {
815                 
if ((this._connection == null)) {
816                     
this.InitConnection();
817                 }
818                 
return this._connection;
819             }
820             
set {
821                 
this._connection = value;
822                 
if ((this.Adapter.InsertCommand != null)) {
823                     
this.Adapter.InsertCommand.Connection = value;
824                 }
825                 
if ((this.Adapter.DeleteCommand != null)) {
826                     
this.Adapter.DeleteCommand.Connection = value;
827                 }
828                 
if ((this.Adapter.UpdateCommand != null)) {
829                     
this.Adapter.UpdateCommand.Connection = value;
830                 }
831                 
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
832                     
if ((this.CommandCollection[i] != null)) {
833                         ((
global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
834                     }
835                 }
836             }
837         }
838         
839         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
840         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
841         
internal global::System.Data.SqlClient.SqlTransaction Transaction {
842             
get {
843                 
return this._transaction;
844             }
845             
set {
846                 
this._transaction = value;
847                 
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
848                     
this.CommandCollection[i].Transaction = this._transaction;
849                 }
850                 
if (((this.Adapter != null)
851                             && (
this.Adapter.DeleteCommand != null))) {
852                     
this.Adapter.DeleteCommand.Transaction = this._transaction;
853                 }
854                 
if (((this.Adapter != null)
855                             && (
this.Adapter.InsertCommand != null))) {
856                     
this.Adapter.InsertCommand.Transaction = this._transaction;
857                 }
858                 
if (((this.Adapter != null)
859                             && (
this.Adapter.UpdateCommand != null))) {
860                     
this.Adapter.UpdateCommand.Transaction = this._transaction;
861                 }
862             }
863         }
864         
865         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
866         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
867         
protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
868             
get {
869                 
if ((this._commandCollection == null)) {
870                     
this.InitCommandCollection();
871                 }
872                 
return this._commandCollection;
873             }
874         }
875         
876         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
877         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
878         
public bool ClearBeforeFill {
879             
get {
880                 
return this._clearBeforeFill;
881             }
882             
set {
883                 
this._clearBeforeFill = value;
884             }
885         }
886         
887         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
888         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
889         
private void InitAdapter() {
890             
this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
891             
global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
892             tableMapping.SourceTable =
"Table";
893             tableMapping.DataSetTable =
"acnt";
894             tableMapping.ColumnMappings.Add(
"Id", "Id");
895             tableMapping.ColumnMappings.Add(
"name", "name");
896             tableMapping.ColumnMappings.Add(
"addr", "addr");
897             tableMapping.ColumnMappings.Add(
"mobile", "mobile");
898             tableMapping.ColumnMappings.Add(
"center", "center");
899             
this._adapter.TableMappings.Add(tableMapping);
900             
this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
901             
this._adapter.DeleteCommand.Connection = this.Connection;
902             
this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[acnt] WHERE (([Id] = @Original_Id) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name)) AND ((@IsNull_addr = 1 AND [addr] IS NULL) OR ([addr] = @Original_addr)) AND ((@IsNull_mobile = 1 AND [mobile] IS NULL) OR ([mobile] = @Original_mobile)) AND ((@IsNull_center = 1 AND [center] IS NULL) OR ([center] = @Original_center)))";
903             
this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
904             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
905             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_name", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
906             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
907             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_addr", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "addr", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
908             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_addr", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "addr", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
909             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_mobile", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "mobile", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
910             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_mobile", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "mobile", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
911             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_center", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "center", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
912             
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_center", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "center", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
913             
this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
914             
this._adapter.InsertCommand.Connection = this.Connection;
915             
this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[acnt] ([name], [addr], [mobile], [center]) VALUES (@name, @add" +
916                 
"r, @mobile, @center);\r\nSELECT Id, name, addr, mobile, center FROM acnt WHERE (Id" +
917                 
" = SCOPE_IDENTITY())";
918             
this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
919             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
920             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@addr", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "addr", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
921             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@mobile", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "mobile", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
922             
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@center", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "center", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
923             
this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
924             
this._adapter.UpdateCommand.Connection = this.Connection;
925             
this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[acnt] SET [name] = @name, [addr] = @addr, [mobile] = @mobile, [center] = @center WHERE (([Id] = @Original_Id) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name)) AND ((@IsNull_addr = 1 AND [addr] IS NULL) OR ([addr] = @Original_addr)) AND ((@IsNull_mobile = 1 AND [mobile] IS NULL) OR ([mobile] = @Original_mobile)) AND ((@IsNull_center = 1 AND [center] IS NULL) OR ([center] = @Original_center)));
926 SELECT Id, name, addr, mobile, center FROM acnt WHERE (Id = @Id)"
;
927             
this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
928             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
929             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@addr", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "addr", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
930             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@mobile", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "mobile", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
931             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@center", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "center", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
932             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
933             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_name", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
934             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
935             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_addr", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "addr", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
936             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_addr", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "addr", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
937             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_mobile", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "mobile", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
938             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_mobile", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "mobile", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
939             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_center", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "center", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
940             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_center", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "center", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
941             
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
942         }
943         
944         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
945         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
946         
private void InitConnection() {
947             
this._connection = new global::System.Data.SqlClient.SqlConnection();
948             
this._connection.ConnectionString = global::MilkDairyManagementSystemCSharp.Properties.Settings.Default.milkdairyConnectionString;
949         }
950         
951         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
952         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
953         
private void InitCommandCollection() {
954             
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
955             
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
956             
this._commandCollection[0].Connection = this.Connection;
957             
this._commandCollection[0].CommandText = "SELECT Id, name, addr, mobile, center FROM dbo.acnt";
958             
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
959         }
960         
961         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
962         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
963         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
964         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
965         
public virtual int Fill(milkdairyDataSet1.acntDataTable dataTable) {
966             
this.Adapter.SelectCommand = this.CommandCollection[0];
967             
if ((this.ClearBeforeFill == true)) {
968                 dataTable.Clear();
969             }
970             
int returnValue = this.Adapter.Fill(dataTable);
971             
return returnValue;
972         }
973         
974         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
975         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
976         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
977         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
978         
public virtual milkdairyDataSet1.acntDataTable GetData() {
979             
this.Adapter.SelectCommand = this.CommandCollection[0];
980             milkdairyDataSet1.acntDataTable dataTable =
new milkdairyDataSet1.acntDataTable();
981             
this.Adapter.Fill(dataTable);
982             
return dataTable;
983         }
984         
985         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
986         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
987         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
988         
public virtual int Update(milkdairyDataSet1.acntDataTable dataTable) {
989             
return this.Adapter.Update(dataTable);
990         }
991         
992         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
993         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
994         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
995         
public virtual int Update(milkdairyDataSet1 dataSet) {
996             
return this.Adapter.Update(dataSet, "acnt");
997         }
998         
999         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1000         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1001         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1002         
public virtual int Update(global::System.Data.DataRow dataRow) {
1003             
return this.Adapter.Update(new global::System.Data.DataRow[] {
1004                         dataRow});
1005         }
1006         
1007         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1008         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1009         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1010         
public virtual int Update(global::System.Data.DataRow[] dataRows) {
1011             
return this.Adapter.Update(dataRows);
1012         }
1013         
1014         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1015         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1016         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1017         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
1018         
public virtual int Delete(int Original_Id, string Original_name, string Original_addr, string Original_mobile, string Original_center) {
1019             
this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_Id));
1020             
if ((Original_name == null)) {
1021                 
this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1));
1022                 
this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value;
1023             }
1024             
else {
1025                 
this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0));
1026                 
this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_name));
1027             }
1028             
if ((Original_addr == null)) {
1029                 
this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1));
1030                 
this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value;
1031             }
1032             
else {
1033                 
this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0));
1034                 
this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_addr));
1035             }
1036             
if ((Original_mobile == null)) {
1037                 
this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1));
1038                 
this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value;
1039             }
1040             
else {
1041                 
this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0));
1042                 
this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_mobile));
1043             }
1044             
if ((Original_center == null)) {
1045                 
this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1));
1046                 
this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value;
1047             }
1048             
else {
1049                 
this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0));
1050                 
this.Adapter.DeleteCommand.Parameters[8].Value = ((string)(Original_center));
1051             }
1052             
global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
1053             
if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
1054                         !=
global::System.Data.ConnectionState.Open)) {
1055                 
this.Adapter.DeleteCommand.Connection.Open();
1056             }
1057             
try {
1058                 
int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
1059                 
return returnValue;
1060             }
1061             
finally {
1062                 
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1063                     
this.Adapter.DeleteCommand.Connection.Close();
1064                 }
1065             }
1066         }
1067         
1068         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1069         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1070         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1071         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
1072         
public virtual int Insert(string name, string addr, string mobile, string center) {
1073             
if ((name == null)) {
1074                 
this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value;
1075             }
1076             
else {
1077                 
this.Adapter.InsertCommand.Parameters[0].Value = ((string)(name));
1078             }
1079             
if ((addr == null)) {
1080                 
this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value;
1081             }
1082             
else {
1083                 
this.Adapter.InsertCommand.Parameters[1].Value = ((string)(addr));
1084             }
1085             
if ((mobile == null)) {
1086                 
this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value;
1087             }
1088             
else {
1089                 
this.Adapter.InsertCommand.Parameters[2].Value = ((string)(mobile));
1090             }
1091             
if ((center == null)) {
1092                 
this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value;
1093             }
1094             
else {
1095                 
this.Adapter.InsertCommand.Parameters[3].Value = ((string)(center));
1096             }
1097             
global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
1098             
if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
1099                         !=
global::System.Data.ConnectionState.Open)) {
1100                 
this.Adapter.InsertCommand.Connection.Open();
1101             }
1102             
try {
1103                 
int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
1104                 
return returnValue;
1105             }
1106             
finally {
1107                 
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1108                     
this.Adapter.InsertCommand.Connection.Close();
1109                 }
1110             }
1111         }
1112         
1113         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1114         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1115         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1116         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
1117         
public virtual int Update(string name, string addr, string mobile, string center, int Original_Id, string Original_name, string Original_addr, string Original_mobile, string Original_center, int Id) {
1118             
if ((name == null)) {
1119                 
this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value;
1120             }
1121             
else {
1122                 
this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(name));
1123             }
1124             
if ((addr == null)) {
1125                 
this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value;
1126             }
1127             
else {
1128                 
this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(addr));
1129             }
1130             
if ((mobile == null)) {
1131                 
this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value;
1132             }
1133             
else {
1134                 
this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(mobile));
1135             }
1136             
if ((center == null)) {
1137                 
this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value;
1138             }
1139             
else {
1140                 
this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(center));
1141             }
1142             
this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_Id));
1143             
if ((Original_name == null)) {
1144                 
this.Adapter.UpdateCommand.Parameters[5].Value = ((object)(1));
1145                 
this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value;
1146             }
1147             
else {
1148                 
this.Adapter.UpdateCommand.Parameters[5].Value = ((object)(0));
1149                 
this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_name));
1150             }
1151             
if ((Original_addr == null)) {
1152                 
this.Adapter.UpdateCommand.Parameters[7].Value = ((object)(1));
1153                 
this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value;
1154             }
1155             
else {
1156                 
this.Adapter.UpdateCommand.Parameters[7].Value = ((object)(0));
1157                 
this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_addr));
1158             }
1159             
if ((Original_mobile == null)) {
1160                 
this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(1));
1161                 
this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value;
1162             }
1163             
else {
1164                 
this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(0));
1165                 
this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_mobile));
1166             }
1167             
if ((Original_center == null)) {
1168                 
this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(1));
1169                 
this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value;
1170             }
1171             
else {
1172                 
this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(0));
1173                 
this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(Original_center));
1174             }
1175             
this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(Id));
1176             
global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
1177             
if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
1178                         !=
global::System.Data.ConnectionState.Open)) {
1179                 
this.Adapter.UpdateCommand.Connection.Open();
1180             }
1181             
try {
1182                 
int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
1183                 
return returnValue;
1184             }
1185             
finally {
1186                 
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1187                     
this.Adapter.UpdateCommand.Connection.Close();
1188                 }
1189             }
1190         }
1191         
1192         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1193         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1194         
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1195         
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
1196         
public virtual int Update(string name, string addr, string mobile, string center, int Original_Id, string Original_name, string Original_addr, string Original_mobile, string Original_center) {
1197             
return this.Update(name, addr, mobile, center, Original_Id, Original_name, Original_addr, Original_mobile, Original_center, Original_Id);
1198         }
1199     }

1200     
1201     ///
<summary>
1202     ///
TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
1203     ///</summary>

1204     
[global::System.ComponentModel.DesignerCategoryAttribute("code")]
1205     
[global::System.ComponentModel.ToolboxItem(true)]
1206     [
global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
1207         
"esigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
1208     
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")]
1209     
public partial class TableAdapterManager : global::System.ComponentModel.Component {
1210         
1211         
private UpdateOrderOption _updateOrder;
1212         
1213         
private acntTableAdapter _acntTableAdapter;
1214         
1215         
private bool _backupDataSetBeforeUpdate;
1216         
1217         
private global::System.Data.IDbConnection _connection;
1218         
1219         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1220         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1221         
public UpdateOrderOption UpdateOrder {
1222             
get {
1223                 
return this._updateOrder;
1224             }
1225             
set {
1226                 
this._updateOrder = value;
1227             }
1228         }
1229         
1230         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1231         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1232         [
global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
1233             
"ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
1234             
"a", "System.Drawing.Design.UITypeEditor")]
1235         
public acntTableAdapter acntTableAdapter {
1236             
get {
1237                 
return this._acntTableAdapter;
1238             }
1239             
set {
1240                 
this._acntTableAdapter = value;
1241             }
1242         }
1243         
1244         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1245         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1246         
public bool BackupDataSetBeforeUpdate {
1247             
get {
1248                 
return this._backupDataSetBeforeUpdate;
1249             }
1250             
set {
1251                 
this._backupDataSetBeforeUpdate = value;
1252             }
1253         }
1254         
1255         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1256         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1257         
[global::System.ComponentModel.Browsable(false)]
1258         
public global::System.Data.IDbConnection Connection {
1259             
get {
1260                 
if ((this._connection != null)) {
1261                     
return this._connection;
1262                 }
1263                 
if (((this._acntTableAdapter != null)
1264                             && (
this._acntTableAdapter.Connection != null))) {
1265                     
return this._acntTableAdapter.Connection;
1266                 }
1267                 
return null;
1268             }
1269             
set {
1270                 
this._connection = value;
1271             }
1272         }
1273         
1274         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1275         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1276         
[global::System.ComponentModel.Browsable(false)]
1277         
public int TableAdapterInstanceCount {
1278             
get {
1279                 
int count = 0;
1280                 
if ((this._acntTableAdapter != null)) {
1281                     count = (count +
1);
1282                 }
1283                 
return count;
1284             }
1285         }

1286         
1287         ///
<summary>
1288         ///
Update rows in top-down order.
1289         ///</summary>

1290         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1291         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1292         
private int UpdateUpdatedRows(milkdairyDataSet1 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1293             
int result = 0;
1294             
if ((this._acntTableAdapter != null)) {
1295                 
global::System.Data.DataRow[] updatedRows = dataSet.acnt.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
1296                 updatedRows =
this.GetRealUpdatedRows(updatedRows, allAddedRows);
1297                 
if (((updatedRows != null)
1298                             && (
0 < updatedRows.Length))) {
1299                     result = (result +
this._acntTableAdapter.Update(updatedRows));
1300                     allChangedRows.AddRange(updatedRows);
1301                 }
1302             }
1303             
return result;
1304         }

1305         
1306         ///
<summary>
1307         ///
Insert rows in top-down order.
1308         ///</summary>

1309         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1310         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1311         
private int UpdateInsertedRows(milkdairyDataSet1 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1312             
int result = 0;
1313             
if ((this._acntTableAdapter != null)) {
1314                 
global::System.Data.DataRow[] addedRows = dataSet.acnt.Select(null, null, global::System.Data.DataViewRowState.Added);
1315                 
if (((addedRows != null)
1316                             && (
0 < addedRows.Length))) {
1317                     result = (result +
this._acntTableAdapter.Update(addedRows));
1318                     allAddedRows.AddRange(addedRows);
1319                 }
1320             }
1321             
return result;
1322         }

1323         
1324         ///
<summary>
1325         ///
Delete rows in bottom-up order.
1326         ///</summary>

1327         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1328         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1329         
private int UpdateDeletedRows(milkdairyDataSet1 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) {
1330             
int result = 0;
1331             
if ((this._acntTableAdapter != null)) {
1332                 
global::System.Data.DataRow[] deletedRows = dataSet.acnt.Select(null, null, global::System.Data.DataViewRowState.Deleted);
1333                 
if (((deletedRows != null)
1334                             && (
0 < deletedRows.Length))) {
1335                     result = (result +
this._acntTableAdapter.Update(deletedRows));
1336                     allChangedRows.AddRange(deletedRows);
1337                 }
1338             }
1339             
return result;
1340         }

1341         
1342         ///
<summary>
1343         ///
Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
1344         ///</summary>

1345         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1346         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1347         
private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1348             
if (((updatedRows == null)
1349                         || (updatedRows.Length <
1))) {
1350                 
return updatedRows;
1351             }
1352             
if (((allAddedRows == null)
1353                         || (allAddedRows.Count <
1))) {
1354                 
return updatedRows;
1355             }
1356             
global::System.Collections.Generic.List<global::System.Data.DataRow> realUpdatedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
1357             
for (int i = 0; (i < updatedRows.Length); i = (i + 1)) {
1358                 
global::System.Data.DataRow row = updatedRows[i];
1359                 
if ((allAddedRows.Contains(row) == false)) {
1360                     realUpdatedRows.Add(row);
1361                 }
1362             }
1363             
return realUpdatedRows.ToArray();
1364         }

1365         
1366         ///
<summary>
1367         ///
Update all changes to the dataset.
1368         ///</summary>

1369         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1370         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1371         
public virtual int UpdateAll(milkdairyDataSet1 dataSet) {
1372             
if ((dataSet == null)) {
1373                 
throw new global::System.ArgumentNullException("dataSet");
1374             }
1375             
if ((dataSet.HasChanges() == false)) {
1376                 
return 0;
1377             }
1378             
if (((this._acntTableAdapter != null)
1379                         && (
this.MatchTableAdapterConnection(this._acntTableAdapter.Connection) == false))) {
1380                 
throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
1381                         
"tring.");
1382             }
1383             
global::System.Data.IDbConnection workConnection = this.Connection;
1384             
if ((workConnection == null)) {
1385                 
throw new global::System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana" +
1386                         
"ger TableAdapter property to a valid TableAdapter instance.");
1387             }
1388             
bool workConnOpened = false;
1389             
if (((workConnection.State & global::System.Data.ConnectionState.Broken)
1390                         ==
global::System.Data.ConnectionState.Broken)) {
1391                 workConnection.Close();
1392             }
1393             
if ((workConnection.State == global::System.Data.ConnectionState.Closed)) {
1394                 workConnection.Open();
1395                 workConnOpened =
true;
1396             }
1397             
global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction();
1398             
if ((workTransaction == null)) {
1399                 
throw new global::System.ApplicationException("The transaction cannot begin. The current data connection does not support transa" +
1400                         
"ctions or the current state is not allowing the transaction to begin.");
1401             }
1402             
global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
1403             
global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
1404             
global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter> adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter>();
1405             
global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection> revertConnections = new global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection>();
1406             
int result = 0;
1407             
global::System.Data.DataSet backupDataSet = null;
1408             
if (this.BackupDataSetBeforeUpdate) {
1409                 backupDataSet =
new global::System.Data.DataSet();
1410                 backupDataSet.Merge(dataSet);
1411             }
1412             
try {
1413                 
// ---- Prepare for update -----------
1414                 
//
1415                 
if ((this._acntTableAdapter != null)) {
1416                     revertConnections.Add(
this._acntTableAdapter, this._acntTableAdapter.Connection);
1417                     
this._acntTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
1418                     
this._acntTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
1419                     
if (this._acntTableAdapter.Adapter.AcceptChangesDuringUpdate) {
1420                         
this._acntTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
1421                         adaptersWithAcceptChangesDuringUpdate.Add(
this._acntTableAdapter.Adapter);
1422                     }
1423                 }
1424                 
//
1425                 
//---- Perform updates -----------
1426                 
//
1427                 
if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) {
1428                     result = (result +
this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
1429                     result = (result +
this.UpdateInsertedRows(dataSet, allAddedRows));
1430                 }
1431                 
else {
1432                     result = (result +
this.UpdateInsertedRows(dataSet, allAddedRows));
1433                     result = (result +
this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
1434                 }
1435                 result = (result +
this.UpdateDeletedRows(dataSet, allChangedRows));
1436                 
//
1437                 
//---- Commit updates -----------
1438                 
//
1439                 workTransaction.Commit();
1440                 
if ((0 < allAddedRows.Count)) {
1441                     
global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
1442                     allAddedRows.CopyTo(rows);
1443                     
for (int i = 0; (i < rows.Length); i = (i + 1)) {
1444                         
global::System.Data.DataRow row = rows[i];
1445                         row.AcceptChanges();
1446                     }
1447                 }
1448                 
if ((0 < allChangedRows.Count)) {
1449                     
global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count];
1450                     allChangedRows.CopyTo(rows);
1451                     
for (int i = 0; (i < rows.Length); i = (i + 1)) {
1452                         
global::System.Data.DataRow row = rows[i];
1453                         row.AcceptChanges();
1454                     }
1455                 }
1456             }
1457             
catch (global::System.Exception ex) {
1458                 workTransaction.Rollback();
1459                 
// ---- Restore the dataset -----------
1460                 
if (this.BackupDataSetBeforeUpdate) {
1461                     
global::System.Diagnostics.Debug.Assert((backupDataSet != null));
1462                     dataSet.Clear();
1463                     dataSet.Merge(backupDataSet);
1464                 }
1465                 
else {
1466                     
if ((0 < allAddedRows.Count)) {
1467                         
global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
1468                         allAddedRows.CopyTo(rows);
1469                         
for (int i = 0; (i < rows.Length); i = (i + 1)) {
1470                             
global::System.Data.DataRow row = rows[i];
1471                             row.AcceptChanges();
1472                             row.SetAdded();
1473                         }
1474                     }
1475                 }
1476                 
throw ex;
1477             }
1478             
finally {
1479                 
if (workConnOpened) {
1480                     workConnection.Close();
1481                 }
1482                 
if ((this._acntTableAdapter != null)) {
1483                     
this._acntTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._acntTableAdapter]));
1484                     
this._acntTableAdapter.Transaction = null;
1485                 }
1486                 
if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
1487                     
global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
1488                     adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters);
1489                     
for (int i = 0; (i < adapters.Length); i = (i + 1)) {
1490                         
global::System.Data.Common.DataAdapter adapter = adapters[i];
1491                         adapter.AcceptChangesDuringUpdate =
true;
1492                     }
1493                 }
1494             }
1495             
return result;
1496         }
1497         
1498         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1499         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1500         
protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) {
1501             
global::System.Array.Sort<global::System.Data.DataRow>(rows, new SelfReferenceComparer(relation, childFirst));
1502         }
1503         
1504         
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1505         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1506         
protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) {
1507             
if ((this._connection != null)) {
1508                 
return true;
1509             }
1510             
if (((this.Connection == null)
1511                         || (inputConnection ==
null))) {
1512                 
return true;
1513             }
1514             
if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) {
1515                 
return true;
1516             }
1517             
return false;
1518         }

1519         
1520         ///
<summary>
1521         ///
Update Order Option
1522         ///</summary>

1523         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1524         
public enum UpdateOrderOption {
1525             
1526             InsertUpdateDelete =
0,
1527             
1528             UpdateInsertDelete =
1,
1529         }

1530         
1531         ///
<summary>
1532         ///
Used to sort self-referenced table's rows
1533         ///</summary>

1534         
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1535         
private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer<global::System.Data.DataRow> {
1536             
1537             
private global::System.Data.DataRelation _relation;
1538             
1539             
private int _childFirst;
1540             
1541             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1542             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1543             
internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) {
1544                 
this._relation = relation;
1545                 
if (childFirst) {
1546                     
this._childFirst = -1;
1547                 }
1548                 
else {
1549                     
this._childFirst = 1;
1550                 }
1551             }
1552             
1553             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1554             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1555             
private global::System.Data.DataRow GetRoot(global::System.Data.DataRow row, out int distance) {
1556                 
global::System.Diagnostics.Debug.Assert((row != null));
1557                 
global::System.Data.DataRow root = row;
1558                 distance =
0;
1559
1560                 
global::System.Collections.Generic.IDictionary<global::System.Data.DataRow, global::System.Data.DataRow> traversedRows = new global::System.Collections.Generic.Dictionary<global::System.Data.DataRow, global::System.Data.DataRow>();
1561                 traversedRows[row] = row;
1562
1563                 
global::System.Data.DataRow parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
1564                 
for (
1565                 ; ((parent !=
null)
1566                             && (traversedRows.ContainsKey(parent) ==
false));
1567                 ) {
1568                     distance = (distance +
1);
1569                     root = parent;
1570                     traversedRows[parent] = parent;
1571                     parent = parent.GetParentRow(
this._relation, global::System.Data.DataRowVersion.Default);
1572                 }
1573
1574                 
if ((distance == 0)) {
1575                     traversedRows.Clear();
1576                     traversedRows[row] = row;
1577                     parent = row.GetParentRow(
this._relation, global::System.Data.DataRowVersion.Original);
1578                     
for (
1579                     ; ((parent !=
null)
1580                                 && (traversedRows.ContainsKey(parent) ==
false));
1581                     ) {
1582                         distance = (distance +
1);
1583                         root = parent;
1584                         traversedRows[parent] = parent;
1585                         parent = parent.GetParentRow(
this._relation, global::System.Data.DataRowVersion.Original);
1586                     }
1587                 }
1588
1589                 
return root;
1590             }
1591             
1592             
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1593             
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1594             
public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) {
1595                 
if (object.ReferenceEquals(row1, row2)) {
1596                     
return 0;
1597                 }
1598                 
if ((row1 == null)) {
1599                     
return -1;
1600                 }
1601                 
if ((row2 == null)) {
1602                     
return 1;
1603                 }
1604
1605                 
int distance1 = 0;
1606                 
global::System.Data.DataRow root1 = this.GetRoot(row1, out distance1);
1607
1608                 
int distance2 = 0;
1609                 
global::System.Data.DataRow root2 = this.GetRoot(row2, out distance2);
1610
1611                 
if (object.ReferenceEquals(root1, root2)) {
1612                     
return (this._childFirst * distance1.CompareTo(distance2));
1613                 }
1614                 
else {
1615                     
global::System.Diagnostics.Debug.Assert(((root1.Table != null)
1616                                     && (root2.Table !=
null)));
1617                     
if ((root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2))) {
1618                         
return -1;
1619                     }
1620                     
else {
1621                         
return 1;
1622                     }
1623                 }
1624             }
1625         }
1626     }
1627 }
1628
1629 #pragma warning restore
1591


Gõ tìm kiếm nhanh...